const routes = [
  // 快递员充值消费
  {
    name: "courierRecharge",
    path: "/courierRecharge/list",
    component: "/courierRecharge"
  },
  // 快递员充值明细
  {
    name: "rechargeDetail",
    path: "/courierRecharge/list/rechargeDetail",
    component: "/rechargeDetail",
    hideInMenu: true,
  },
  // 快递员消费明细
  {
    name: "consumeDetail",
    path: "/courierRecharge/list/consumeDetail",
    component: "/consumeDetail",
    hideInMenu: true,
  }
]

const recharge = routes.map((route: any) => {
  route.path = `/recharge${route.path}`;
  route.component = `./recharge${route.component}`;
  return route;
}, {});

export default [
  {
    name: "recharge",
    path: "/recharge",
    icon: "smile",
    routes: [
      ...recharge,
      {
        component: "./404"
      }
    ]
  }
]
